package main

import (
	kibana "github.com/disaster37/go-kibana-rest/v8"
	"log"
)

func main() {
	cfg := kibana.Config{
		Address:          "http://kibana.hkaws.hszq8.com",
		Username:         "kibanaro",
		Password:         "2keQPZuJYeHdRVwW",
		DisableVerifySSL: true,
	}

	client, err := kibana.NewClient(cfg)

	if err != nil {
		log.Fatalf("Error creating the client: %s", err)
	}

	status, err := client.API.KibanaStatus.Get()
	if err != nil {
		log.Fatalf("Error getting response: %s", err)
	}
	log.Println(status)
}
